import { createApp, toRaw } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import './assets/main.css'
import piniaToLocalStoragePlugin from './stores/piniaToLocalStoragePlugin'

const app = createApp(App)
const store = createPinia()
store.use(
  piniaToLocalStoragePlugin({
    key: 'pinia', // 这是给缓存到本地时，加一个特殊的前缀，以免造成污染到其他缓存数据
    needKeepIds: ['BASE','TEST'], // 对于特定store进行持久化,store的名字都在store-names文件中抽离出来了,空或者不传，则对所有的store进行缓存到本地
  })
)

app.use(router)
app.use(store)
app.mount('#app')
